<template>
    <h3>事件修饰符</h3>
    <div>
        <a @click.prevent="clickHandler" href="http://baidu.com">百度一下</a>
    </div>

    <div @click="clickDiv">
        <p @click.stop="clickP">测试冒泡</p>
    </div>
    
</template>
<script>
export default{
    data () {
        return {
            names:["demo111","demo222","demo333"]
        }
    },
    methods:{
        clickHandler(e){
            // e.preventDefault();
            
            console.log("点击了")
        },
        clickDiv(){
            console.log("DIV");
        },
        clickP(e){
            // e.stopPropagation();
            
            console.log("P");
        },
    }
}
</script>